<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--view视图-->
<div id="app">

    <!--组件，传递给组件中的值，接收值props-->
    <ceshi v-for="item in items" v-bind:item="item"></ceshi>
    <ceshi1></ceshi1>

</div>


<!--1.导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>

    //定义一个Vue组件component
    Vue.component("ceshi",{
        props: ['item'],
        template: '<h1>{{item}}</h1>'
    });
    Vue.component("ceshi1",{
        props: ['item'],
        template: '<h1>666</h1>'
    });

    var vm= new Vue({
        el: "#app",
        data: {
            items: ["java","linux","前端"]
        }
    });
</script>
</body>
</html>